package com.china.produce.handler;

import org.springframework.beans.factory.InitializingBean;

/**
 * 抽象类实现接口，自己没有实现接口方法，让子类实现
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/2/9
 */
public abstract class AbstractHandler implements InitializingBean {

    void aa(String a) {
        throw new UnsupportedOperationException();
    }

    String bb(String b) {
        throw new UnsupportedOperationException();
    }

    public abstract String serviceName();

    public void afterPropertiesSet() throws Exception {
        Factory.register(serviceName(), this);
    }
}
